package demo7;

/**
 * @author Huangjin
 * @version 1.0
 * describe:
 * @date 2023/2/28 17:41
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        String str = "thinking in java";
        boolean starts = str.startsWith("think");
        System.out.println(starts);
        boolean ends = str.endsWith(".png");
        System.out.println(ends);

        String str1 = "thinking in java";
        boolean starts1 = str1.startsWith("think");
        System.out.println(starts1);
        boolean ends1 = str1.endsWith(".png");
        System.out.println(ends1);
    }
}
